package com.yanq.liancar.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yanq.liancar.R;
import com.yanq.liancar.bean.CashCouponBean;
import com.yanq.liancar.bean.ServiceforBuyBean;

import java.util.List;

public class CashCouponAdapter extends BaseQuickAdapter<ServiceforBuyBean.DataBean.CouponBean,BaseViewHolder> {
    public CashCouponAdapter(int layoutResId, @Nullable List<ServiceforBuyBean.DataBean.CouponBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ServiceforBuyBean.DataBean.CouponBean item) {
        helper.setText(R.id.tv_name,item.getCashcoupon_name())
                .setText(R.id.tv_Use,item.getTip_name())
                .setText(R.id.tv_Deductible,item.getCashcoupon_value()+"")
                .setText(R.id.tv_Termofvalidity,item.getIndate_start()+"-"+item.getIndate_end());
    }
}
